{
 "cells": [
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "# A simple model of global cascades on random networks\n",
    "\n",
    "Duncan J. Watts*\n",
    "\n",
    "Department of Sociology, Columbia University New York, NY 10027\n",
    "\n",
    "5766–5771 PNAS April 30, 2002. vol. 99 no. 9\n",
    "www.pnas.org/cgi/doi/10.1073/pnas.082090499\n",
    "\n",
    "\n",
    "**Fig. 1. Cascade windows for the threshold model**\n",
    "\n",
    "![image.png](./img/watts1.png)\n",
    "\n",
    "   Z represents average degree; $\\phi_*$ represents average threshold. \n",
    "\n",
    "\n",
    "\n",
    "**Fig. 4. Analytically derived cascade windows for heterogeneous networks.** \n",
    "\n",
    "![image.png](./img/watts2.png)\n",
    "\n",
    "Heterogeneity plays an ambiguous role in determining a system’s stability: \n",
    "- increasingly heterogeneous thresholds make the system more vulnerable to global cascades; \n",
    "- but an increasingly heterogeneous degree distribution makes it less vulnerable.\n",
    "\n",
    "\n",
    "\n"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 68,
   "metadata": {
    "ExecuteTime": {
     "end_time": "2020-12-21T07:11:11.106931Z",
     "start_time": "2020-12-21T07:11:11.103286Z"
    }
   },
   "outputs": [],
   "source": [
    "from scipy.stats import norm\n",
    "import numpy as np\n",
    "import networkx as nx\n",
    "import matplotlib.pyplot as plt\n",
    "import matplotlib\n",
    "\n",
    "matplotlib.style.use('fivethirtyeight')"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 69,
   "metadata": {
    "ExecuteTime": {
     "end_time": "2020-12-21T07:11:11.872730Z",
     "start_time": "2020-12-21T07:11:11.869512Z"
    }
   },
   "outputs": [],
   "source": [
    "def generate_threshold(Mean, Standard_Deviation, N):\n",
    "    return np.random.normal(Mean, Standard_Deviation, N)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 94,
   "metadata": {
    "ExecuteTime": {
     "end_time": "2020-12-21T07:22:21.148942Z",
     "start_time": "2020-12-21T07:22:21.019393Z"
    }
   },
   "outputs": [
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAaIAAAELCAYAAACbGIJJAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAADh0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uMy4xLjMsIGh0dHA6Ly9tYXRwbG90bGliLm9yZy+AADFEAAAb70lEQVR4nO3df1CVZf7/8RcmwUELshQPICi7mAVUkjT4a+aw6s5amVhGhRszZVKTlaib5VaybBm6mem0lLgzNsvYlG3mpOYm7R5HIN0WdbcY2hlJZNVDlopHET2AyvePvp1PZyMPBzlc58DzMcOM576uc+73fc0553XuX5chTqezXQAAGNLPdAEAgL6NIAIAGEUQAQCMIogAAEYRRAAAowgiAIBRBBEAwCiCCABgFEEUgGpra02X0Ccwzj2Dcfa/YB9jgggAYBRBBAAwiiACABhFEAEAjCKIAABGEUQAAKMIIgCAUQQRAMCo/qYLAPqqqLccpktwcz4Ua7oE9GHsEQEAjCKIAABGEUQAAKMIIgCAUQQRAMCoTgXRBx98oPHjx8tqtSolJUXLli1Te3u7u720tFSjR49WdHS0pkyZourqao/nf/bZZ/rFL36h6OhopaWlaePGjd27FQCAoNWpINq/f78WLFigTz75RAsXLtQrr7yiP/3pT5KkzZs3a+HChZo/f74++eQTDRo0SPfee6+am5slSYcOHdLMmTOVnp4uu92uu+++W3l5edq3b5//tgoAEDRCnE5nu/dunrKzs9WvXz+9++67stlsSktL08qVKyVJx48f1w033KDVq1crJydHzz//vP72t79p9+7dCgkJkSRNnDhRqampeuONN7p3a3qJ2tpaJSUlmS6j1zM9zn3lPiLT49wXBPsYd+kc0YULFzRo0CCdOnVKn3/+uaZMmeJuu+6665SamqqqqipJUnl5uSZNmuQOIUnKzMx0twMA+jafgqi5uVmlpaXas2ePHnvsMdXX16u9vV0JCQke/eLi4tTQ0CBJqq+vv2Q7AKBv6/QUP9HR0WppadFVV12lFStW6KabbtKuXbskSRERER59LRaLTp06JUk6c+ZMh+0ul+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f6h0tJSrV27Vps3b+aqLi86O8bt7e2aN2+eFi5cyE3sXeDLe/n8+fNqbW3VunXrNHDgQElSa2urHnzwQR05csR9RCXQsEfUw3yZacJqtXbYT/rxbjo8dWVGjw8++EDPPPOM/vznP+vWW2/1d4lBr7Nj/Nlnn2n37t0qKipSbGysYmNj9dRTT0mSYmNj9d577/VYzcHIl/fykCFDNGTIEHcISdLIkSMlSceOHfNvoZeBIOphvsw0kZGRoX//+99qbGx0L7Pb7Ro9ejS/1r3wdUaPjz76SE888YTWrVvHuaFO6uwY33zzzdq3b58qKytVUVGhiooKPf/885K+O7k+derUni49qPjyXr7tttt0+PBhHT161L3sP//5j/r166cRI0b0VMk+u+LZZ5/9neki+pLQ0FCdPHlSa9as0ahRo3Tq1CktWLBAaWlpevTRR1VYWKidO3fKZrPpZz/7md5++21VVVVp5MiRqqio0Msvv6xly5a5f+WgY76M844dO/Tggw/queee09ixY3Xy5EmdPHlSTU1NioyMNL0pAauzYzx58mRdc801Hn/19fXaunWrli9f7j70hI758l4ePny4tmzZor/+9a9KSkpSTU2Nnn32Wd17773u/5g0EHGOyICCggK1trYqLy9P7e3tmjZtmoqKiiRJdXV1CgkJkfTdeaD3339f8+fP1y9/+UsNHTpUf/jDH3THHXeYLD9odHac33vvPbW0tOiFF17QCy+84H7+sGHDVF1dbaT2YNHZMcbl6ew4X3HFFXrvvff0m9/8RjNmzFB4eLiys7NVWFhosnyvuKEVAGAU54gAAEYRRAAAowgiAIBRBBEAwCiCCABgFEEEADCKIAIAGEUQAQCMIogAAEYRRAAAo/4f9/KndhtBNAMAAAAASUVORK5CYII=\n",
      "text/plain": [
       "<Figure size 432x288 with 1 Axes>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "Mean = 0.3\n",
    "Standard_Deviation = 0.1\n",
    "N = 1000\n",
    "thresholds = generate_threshold(Mean, Standard_Deviation, N)\n",
    "\n",
    "plt.hist(thresholds)\n",
    "plt.show()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 95,
   "metadata": {
    "ExecuteTime": {
     "end_time": "2020-12-21T07:22:21.829615Z",
     "start_time": "2020-12-21T07:22:21.825541Z"
    }
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "0.3276822791442385"
      ]
     },
     "execution_count": 95,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "thresholds[0]"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 45,
   "metadata": {
    "ExecuteTime": {
     "end_time": "2020-12-21T07:00:51.410523Z",
     "start_time": "2020-12-21T07:00:51.339682Z"
    }
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "1.04"
      ]
     },
     "execution_count": 45,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "# Network generation\n",
    "g = nx.erdos_renyi_graph(1000, 0.001)\n",
    "\n",
    "deg = [j for i, j in g.degree()]\n",
    "average_degree = np.sum(deg)/len(deg)\n",
    "average_degree"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {
    "ExecuteTime": {
     "end_time": "2020-12-21T06:20:40.710832Z",
     "start_time": "2020-12-21T06:20:40.706703Z"
    }
   },
   "source": [
    "```\n",
    "pip install -U ndlib\n",
    "```"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## Simulation with ndlib"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 7,
   "metadata": {
    "ExecuteTime": {
     "end_time": "2020-12-21T06:15:09.092795Z",
     "start_time": "2020-12-21T06:15:07.803904Z"
    }
   },
   "outputs": [],
   "source": [
    "import networkx as nx\n",
    "import ndlib.models.epidemics as ep\n",
    "import ndlib.models.ModelConfig as mc\n",
    "from bokeh.io import output_notebook, show\n",
    "from ndlib.viz.bokeh.DiffusionTrend import DiffusionTrend\n",
    "from ndlib.viz.bokeh.DiffusionPrevalence import DiffusionPrevalence\n",
    "from ndlib.viz.bokeh.MultiPlot import MultiPlot"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 87,
   "metadata": {
    "ExecuteTime": {
     "end_time": "2020-12-21T07:19:20.076750Z",
     "start_time": "2020-12-21T07:19:20.071422Z"
    }
   },
   "outputs": [],
   "source": [
    "def ER_model_random_network(node_num, prob, thresholds, fraction_infected, iteration_num):\n",
    "    # Network topology\n",
    "    g = nx.erdos_renyi_graph(node_num, prob)\n",
    "    deg = [j for i, j in g.degree()]\n",
    "    average_degree = np.sum(deg)/len(deg)\n",
    "    # Model selection\n",
    "    model = ep.ThresholdModel(g)\n",
    "    # Model Configuration\n",
    "    config = mc.Configuration()\n",
    "    config.add_model_parameter('fraction_infected', fraction_infected)\n",
    "    # Setting node parameters\n",
    "    for k, i in enumerate(g.nodes()):\n",
    "        config.add_node_configuration(\"threshold\", i, thresholds[k])\n",
    "\n",
    "    model.set_initial_status(config)\n",
    "    # Simulation execution\n",
    "    iterations = model.iteration_bunch(iteration_num)\n",
    "    return model, iterations, average_degree"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 119,
   "metadata": {
    "ExecuteTime": {
     "end_time": "2020-12-21T07:35:46.813030Z",
     "start_time": "2020-12-21T07:35:46.612532Z"
    }
   },
   "outputs": [
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "100%|██████████| 30/30 [00:00<00:00, 506.33it/s]"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "1.016 207\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "\n"
     ]
    }
   ],
   "source": [
    "Mean = 0.4\n",
    "Standard_Deviation = 0.1\n",
    "N = 1000\n",
    "thresholds = generate_threshold(Mean, Standard_Deviation, N)\n",
    "prob = 0.001\n",
    "t = 30\n",
    "fraction_infected = 0.1\n",
    "model, iterations, average_degree = ER_model_random_network(N, prob, thresholds, fraction_infected, t)\n",
    "trends = model.build_trends(iterations)\n",
    "#susceptible = trends[0]['trends']['node_count'][0]\n",
    "infected = trends[0]['trends']['node_count'][1]\n",
    "print(average_degree, np.max(infected))"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 121,
   "metadata": {
    "ExecuteTime": {
     "end_time": "2020-12-21T07:36:00.218363Z",
     "start_time": "2020-12-21T07:35:57.804831Z"
    }
   },
   "outputs": [
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "100%|██████████| 30/30 [00:00<00:00, 862.24it/s]\n",
      "100%|██████████| 30/30 [00:00<00:00, 661.11it/s]\n",
      "100%|██████████| 30/30 [00:00<00:00, 540.78it/s]\n",
      "100%|██████████| 30/30 [00:00<00:00, 624.35it/s]\n",
      "100%|██████████| 30/30 [00:00<00:00, 615.94it/s]\n",
      "100%|██████████| 30/30 [00:00<00:00, 602.01it/s]\n",
      "100%|██████████| 30/30 [00:00<00:00, 599.71it/s]\n",
      "100%|██████████| 30/30 [00:00<00:00, 551.06it/s]\n",
      "100%|██████████| 30/30 [00:00<00:00, 492.55it/s]\n",
      "100%|██████████| 30/30 [00:00<00:00, 535.76it/s]\n",
      "100%|██████████| 30/30 [00:00<00:00, 492.20it/s]\n",
      "100%|██████████| 30/30 [00:00<00:00, 506.83it/s]\n",
      "100%|██████████| 30/30 [00:00<00:00, 502.70it/s]\n",
      "100%|██████████| 30/30 [00:00<00:00, 504.92it/s]\n",
      "100%|██████████| 30/30 [00:00<00:00, 504.04it/s]\n",
      "100%|██████████| 30/30 [00:00<00:00, 509.16it/s]\n",
      "100%|██████████| 30/30 [00:00<00:00, 496.25it/s]\n",
      "100%|██████████| 30/30 [00:00<00:00, 518.16it/s]\n",
      "100%|██████████| 30/30 [00:00<00:00, 510.32it/s]\n",
      "100%|██████████| 30/30 [00:00<00:00, 510.60it/s]\n"
     ]
    }
   ],
   "source": [
    "infected_list = []\n",
    "threshold_list = np.linspace(0, 1, 20)\n",
    "for Mean in threshold_list:\n",
    "    Standard_Deviation = 0.01\n",
    "    N = 1000\n",
    "    thresholds = generate_threshold(Mean, Standard_Deviation, N)\n",
    "    prob = 0.001\n",
    "    t = 30\n",
    "    fraction_infected = 0.1\n",
    "    model, iterations, average_degree = ER_model_random_network(N, prob, thresholds, fraction_infected, t)\n",
    "    trends = model.build_trends(iterations)\n",
    "    #susceptible = trends[0]['trends']['node_count'][0]\n",
    "    infected = trends[0]['trends']['node_count'][1]\n",
    "    infected_list.append(np.max(infected))"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 122,
   "metadata": {
    "ExecuteTime": {
     "end_time": "2020-12-21T07:36:01.592645Z",
     "start_time": "2020-12-21T07:36:01.457786Z"
    }
   },
   "outputs": [
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAbcAAAElCAYAAABnOayjAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAADh0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uMy4xLjMsIGh0dHA6Ly9tYXRwbG90bGliLm9yZy+AADFEAAAgAElEQVR4nO3deXxTVf7/8VfSpEkX6N7SjbIIImUXlKVKy6aoCIxfUHBkfsOM6AgKKC64MY6j4AzKMIgsOjgwOoqjsiOLVFoqLuxiQajsbSktbdO9WZr8/iiEphtNaZo0/TwfDx56c+5NTg7lvnvvOfcchU6nsyCEEEK4EaWzKyCEEEI0NQk3IYQQbkfCTQghhNuRcBNCCOF2JNyEEEK4HQk3IYQQbkfCTQghhNuRcBNCCOF2JNwaKC0tzdlVcCnSHrakPWqSNrEl7WHL0e0h4SaEEMLtSLgJIYRwOxJuQggh3I6EmxBCCLcj4SaEEMLtSLgJIYRwO04Nt/z8fGbOnEnnzp0JCwtj2LBh1rKtW7cyaNAgwsLCGDx4MElJSTbHnjx5kjFjxhAeHk5sbCzLly9v7uoLIYRwUU4Lt9LSUu677z5+/fVXVq1axa5du3jssccAOHDgAFOmTGHixIkkJibSr18/Jk+eTHp6OgBFRUWMGzeOkJAQduzYwcyZM5k7dy4bN25s0jpWmC0cyzfy37QS/n5KzfvHi5v0/YUQQjiGylkfvHjxYoqLi9m1axdarRaAHj16WMvi4+OZPXs2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yk2IaiTchGiBtm3bxrBhw6xrok2aNIlJkyZx6dIlJ9dMCNcg4SZEC7N8+XIeeughoqOj6dGjByEhIUydOpVt27bxhz/8wdnVE8IlSLgJ0YIcOXKEF198kccff5zVq1cD0KdPH9544w0mTJhASkoK586dc3IthXA+CTchWpB//OMf+Pn58eqrr2I2mzl+/Dg9evQAYODAgQBcvHjRmVUUwiVIuAnRQphMJnbu3MmIESPw9vYmLS2NsrIya7iVlJQA4OfnV+PYjz/+mD179jRrfYVwJpWzKyCEaJjTp09TXFxsDbOff/4ZgNjYWACOHj2Kt7c3N910k/WY//73v3h7ewNgsVh4//336dixIyNGjGjm2gvRvOTKTYgWoqCgAACtVgtUhptWq6VLly6UlJSwc+dORo4ciVqtth4zceJEMjIyWLZsGa+//jre3t4MHz7cKfUXojlJuAnRQoSHhwPw/fffA5Xh1q1bNzw8PHj99dcpKChg9uzZNY5TKBTW/3p4eFi3hXBnCp1OZ3F2JYQQmLoxCwAAAQJJREFUDTNu3Dh2797NE088wf/+9z+ioqKIiYlh/fr1vPHGG0yfPt1m///+9794eXlRWlpKdHQ0v/zyC506dZLbksLtSbgJ0YJkZ2cza9YsvvnmG8rKylCr1fTo0YM5c+Zw77331nncxx9/TPv27bnjjjuasbZCOI+EmxAtUHJyMvfffz9btmxhyJAhzq6OEC5H+tyEaIFOnjwJIBMmC1EHCTchWqATJ04QEBBAcHCws6sihEuScBOiBTp58qRctQlRD+lzE0II4Xbkyk0IIYTbkXATQgjhdiTchBBCuB0JNyGEEG5Hwk0IIYTbkXATQgjhdiTchBBCuB0JNyGEEG7n/wN0bR5n1S6NpgAAAABJRU5ErkJggg==\n",
      "text/plain": [
       "<Figure size 432x288 with 1 Axes>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "plt.plot(threshold_list, infected_list)\n",
    "plt.xlabel(\"$\\phi_*$\")\n",
    "plt.ylabel(\"Infected\")\n",
    "plt.show()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 126,
   "metadata": {
    "ExecuteTime": {
     "end_time": "2020-12-21T07:42:25.964702Z",
     "start_time": "2020-12-21T07:42:24.053854Z"
    }
   },
   "outputs": [
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "100%|██████████| 30/30 [00:00<00:00, 535.82it/s]\n",
      "100%|██████████| 30/30 [00:00<00:00, 954.92it/s]\n",
      "100%|██████████| 30/30 [00:00<00:00, 1083.55it/s]\n",
      "100%|██████████| 30/30 [00:00<00:00, 1357.95it/s]\n",
      "100%|██████████| 30/30 [00:00<00:00, 1285.12it/s]\n",
      "100%|██████████| 30/30 [00:00<00:00, 1287.95it/s]\n",
      "100%|██████████| 30/30 [00:00<00:00, 1413.72it/s]\n",
      "100%|██████████| 30/30 [00:00<00:00, 1326.12it/s]\n",
      "100%|██████████| 30/30 [00:00<00:00, 1368.50it/s]\n",
      "100%|██████████| 30/30 [00:00<00:00, 1343.12it/s]\n",
      "100%|██████████| 30/30 [00:00<00:00, 1279.44it/s]\n",
      "100%|██████████| 30/30 [00:00<00:00, 1333.70it/s]\n",
      "100%|██████████| 30/30 [00:00<00:00, 1243.62it/s]\n",
      "100%|██████████| 30/30 [00:00<00:00, 1249.99it/s]\n",
      "100%|██████████| 30/30 [00:00<00:00, 1226.09it/s]\n",
      "100%|██████████| 30/30 [00:00<00:00, 1208.36it/s]\n",
      "100%|██████████| 30/30 [00:00<00:00, 1175.60it/s]\n",
      "100%|██████████| 30/30 [00:00<00:00, 1288.61it/s]\n",
      "100%|██████████| 30/30 [00:00<00:00, 1192.56it/s]\n"
     ]
    }
   ],
   "source": [
    "infected_list = []\n",
    "degree_list = []\n",
    "prob_list = [i/1000 for i in range(1, 20)]\n",
    "Mean = 0.1\n",
    "Standard_Deviation = 0.01\n",
    "N = 1000\n",
    "thresholds = generate_threshold(Mean, Standard_Deviation, N)\n",
    "for prob in prob_list:\n",
    "    t = 30\n",
    "    fraction_infected = 0.1\n",
    "    model, iterations, average_degree = ER_model_random_network(N, prob, thresholds, fraction_infected, t)\n",
    "    trends = model.build_trends(iterations)\n",
    "    #susceptible = trends[0]['trends']['node_count'][0]\n",
    "    infected = trends[0]['trends']['node_count'][1]\n",
    "    infected_list.append(np.max(infected))\n",
    "    degree_list.append(average_degree)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 127,
   "metadata": {
    "ExecuteTime": {
     "end_time": "2020-12-21T07:42:59.057874Z",
     "start_time": "2020-12-21T07:42:58.935227Z"
    }
   },
   "outputs": [
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAcUAAAEgCAYAAADFSGi1AAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAADh0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uMy4xLjMsIGh0dHA6Ly9tYXRwbG90bGliLm9yZy+AADFEAAAgAElEQVR4nO3de1xU5d7//9cgAwygQh4QREC6qRRNMemhQneQ6dbStJ1Z4o5+d/22llrqrl2Z7tzuDlbbLDPykNvK9DZLM6280ztpe8i2N2mZqW3JQ+KQ5QnlIDDAfP+QRgcQAwZmzfB+Ph4+cq1rDXzmch7zbq11Xdcy5eXl2RERERF83F2AiIiIUSgURUREKikURUREKikURUREKikURUREKikURUREKikURUREKikURUREKikUpcllZ2e7u4RmSf3uHur3pteQPlcoioiIVFIoioiIVHJ7KBYXF7u7BBEREcBNoXjs2DGWLFlCWloasbGx1drXrVtH3759CQsLo1+/fmzatMmpff/+/QwdOpTw8HDi4+OZP3++U/vZs2cZN24cUVFRREVFMXnyZIWviIhclq87fumIESPIz88nPDycoqIip7YdO3aQnp7O1KlTGThwIPPmzSMtLY3t27cTGRlJfn4+w4cPp0+fPmzYsIEvv/ySxx9/nIiICG677TYAxo4dy5EjR3jvvffIz8/ngQcewGw28+KLL7rj7YqIiIcwuePRUTk5OXTq1Illy5Yxfvx48vLyHG3p6ekUFRWxcuVKAGw2G127duX+++/niSeeYOHChcycOZO9e/disVgAGD16NGfOnOHj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DnDgw8+SFRUFJ06deKhhx6iqOjCii1LliwhISGBsLAwBgwYwO7du51ev337dm666SbCwsLo1asXq1atauq30Kgy9hRw0YpudL/CzI3hejSUiEhDGDYUH3jgAXbu3MnSpUv5xz/+QWZmJo8//jgAa9eu5ZFHHmHy5Mn87//+L1dccQV33nknhYWFABw5coQRI0aQmJhIZmYmv//97xkzZgw7d+5051tymV/OlfPfPzgv6fZwt2BMWtJNRKRBDBmK33//Pf/zP//D3Llz+c///E8GDhzIzJkzWb58OadPn2b27Nncc889pKenc+2115KRkcHJkydZs2YNAAsXLqRjx448//zzxMfHM23aNLp27cqiRYvc/M5cY+G+QkrKL2xHBrVgeGeL+woSEfEShgzFf//73wBce+21jn033HADZWVlbNu2jV27djFgwABHW9u2benevTtZWVkAbN68mf79+zudOaWmpjraPVmhrYJ/fO88wGZ8fDBmH50liog0lCFDMTQ0FICcnBzHvrNnzwKwb98+7HY70dHRTq+JjIwkNzcXgMOHD9fa7smWZhdxuuTC3cQQPxP3XKWFv0VEXMGQs7wTExOJjIxk2rRpvP7665hMJqZMmYLJZKKs7PzqLYGBzkFgsVg4c+YMAAUFBTW2Fxc7j9asKjs724XvwvXK7DDnmwAu/n+Z29uX8tPhA+4rqp6M3tfeSv3uHur3ppednU1cXFydX2fIULRYLLzzzjvcf//9XHnllfj5+fHII4/w6aefEhBw/qG5paXOk9ZLSkocQejv719je1BQ7cuf1acDm9IHB4vILTnt2PbzgSeSOhEW2MKNVdVdfT+s0jDqd/dQvze9hvS5IS+fAiQkJLBz50727dvHgQMHGD58OAAjR44EwGq1Oh1vtVqJiYkBIDw8vMb2qpdUPYndbufVKku63f0fgR4XiCIiRmbYUPxVeHg4LVu2ZNGiRaSmphIREUFUVBSZmZmOY06dOsWuXbtISUkBoE+fPk7tAJ9//rmj3RNtOVbKNydtTvsmxGuyvoiIKxny8inAypUriY2NxWw2s2bNGt59910+/fRTAMaPH89f//pXrr32Wq6++mqeffZZunbt6hiROnbsWPr378/TTz/NHXfcw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ruOqqq1xW2K8/02KxMGTIEKf948ePZ9GiRbz//vt8++23PPjgg3Tt2tUxInXs2LHs3r2bp59+mr179/L0009z8OBBxo4d69L66kMjT0VEjKtOoThp0iT27dvHoEGD+OSTT9i7dy+ZmZmMHDmSbdu28cc//tGlxb399tvcdddd+Pn5Oe0fM2YMEydO5Mknn2TQoEH4+vry7rvv4uNz/u306NGDxYsX8+GHH5KSksLnn3/OqlWriIyMdGl99aGHC4uIGJcpLy/PfvnDLvjv//5vHnvsMYqKii78EJOJCRMmMGPGDJcX6G1mfHWGl3cXOLYf69mSJxNaubGipqeBB+6hfncP9XvTa0if13nIY1paGoMHD2bDhg1YrVZatWpFamqqy5Z483bVHhmlM0UREcOo1zyA0NBQ7rrrLlfX0ixUf7hw85mKISJidHV+XtHx48f5y1/+wtChQ+nduzfffPMNADt37nS6pCo1yynUuqciIkZVp1D85ptvuO6661i4cCHHjx/n4MGDlJSUADBt2jQyMjIapUhvUVJu56eiC3MUTUBHXT4VETGMOoXiU089RWRkJF9//TWfffYZdvuFMTq33Xaby1ez8TbWKvcTwwN98GuhOYoiIkZRp1D86quvmDhxIhEREU5PoADo1KkTOTk5Li3O21R/ZJTuJ4qIGEmdQtHPz89xubSq48ePU1HRvBa1rquqE/c76X6iiIih1CkUb7zxRl566SWnRzCZTCZsNhtvv/02CQkJLi/Qm2g1GxERY6vT9bu//vWv3HTTTfTp04ff/e53mEwmXnvtNf79739z8OBB3VO8jJwql0/1HEUREWOp05li586d+eyzz+jbty9r1qzBbrfz8ccfExwczMqVK0lKSmqsOr2CzhRFRIyt1lOVnTt30qFDByIiIhz7rrzySlasWEFJSQmnTp2iVatWl31OoZxXbd1ThaKIiKHUeqZ466238n//93+O7R49erBt2zbg/IN8w8PDFYi/ka3CTm6RcyhGBunyqYiIkdQaiiEhIezfv9+xfeTIkUuOPpXaWQvLqbho6fX2Fh8svpqjKCJiJLWeqgwbNoyZM2eydu1aWrZsCcDUqVNp3bp1jcebTCbWrVvn+iq9QNVL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FEVERCopFEVERCppORERL/bjjz/So0ePWo/p2LEje/bsaaKKRIxNoSjixdq3b8/KlStrbPv73/9OVlYW8+fPb+KqRIxLoSjixSwWCzfffHO1/Z9++inbt29n4sSJ3HDDDW6oTMSYtPapSDPz888/k5SURMeOHfnss88wm83uLknEMDTQRqQZsdvtPPjggxQVFfHGG28oEEWq0OVTkWbktddeIzMzk9mzZ3PVVVe5uxwRw9HlU5Fm4ttvv+Xmm2+mf//+LF++3N3liBiSQlGkGSgqKiIlJYUzZ87wxRdf0LZtW3eXJGJIunwq0gxMmTKF7Oxs3n//fQWiSC000EbEy3300Ue8/fbbjBkzpsbpGSJygS6finix3NxckpKSKC8v5/XXXycgIKDaMQEBASQnJ7uhOhHjUSiKeLH/+q//YvXq1bUe06lTJ3bv3t1EFYkYm0JRRESkku4pioiIVFIoioiIVFIoioiIVFIoioiIVFIoioiIVFIoioiIVFIoioiIVFIoioiIVFIoioiIVFIoioiIVPp/ZmPlC6tGfkQAAAAASUVORK5CYII=\n",
      "text/plain": [
       "<Figure size 432x288 with 1 Axes>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "plt.plot(degree_list, infected_list)\n",
    "plt.xlabel(\"Z\")\n",
    "plt.ylabel(\"Infected\")\n",
    "plt.show()"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## END"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 8,
   "metadata": {
    "ExecuteTime": {
     "end_time": "2020-12-21T06:15:10.695595Z",
     "start_time": "2020-12-21T06:15:10.690408Z"
    }
   },
   "outputs": [],
   "source": [
    "# In the code below is shown an example of instantiation and execution of a Threshold model simulation \n",
    "# on a random graph: we set the initial set of infected nodes as 1% of the overall population, \n",
    "# and assign a threshold of 0.25 to all the nodes.\n",
    "\n",
    "def watts_model_ba_network(node_num, m, threshold, fraction_infected, iteration_num):\n",
    "    # change these two parameters\n",
    "    # num_neighbors = 1\n",
    "    # threshold = 0.5\n",
    "    # fraction_infected = 0.1\n",
    "    # iteration_num = 30\n",
    "\n",
    "    # Network topology\n",
    "    #g = nx.erdos_renyi_graph(1000, 0.1)\n",
    "    g = nx.barabasi_albert_graph(1000, m)\n",
    "    # Model selection\n",
    "    model = ep.ThresholdModel(g)\n",
    "    # Model Configuration\n",
    "    config = mc.Configuration()\n",
    "    config.add_model_parameter('fraction_infected', fraction_infected)\n",
    "    # Setting node parameters\n",
    "    for i in g.nodes():\n",
    "        config.add_node_configuration(\"threshold\", i, threshold)\n",
    "\n",
    "    model.set_initial_status(config)\n",
    "    # Simulation execution\n",
    "    iterations = model.iteration_bunch(iteration_num)\n",
    "    return model, iterations"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 12,
   "metadata": {
    "ExecuteTime": {
     "end_time": "2020-12-21T06:16:14.159595Z",
     "start_time": "2020-12-21T06:16:14.089035Z"
    }
   },
   "outputs": [
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "100%|██████████| 30/30 [00:00<00:00, 512.94it/s]\n"
     ]
    }
   ],
   "source": [
    "model, iterations = watts_model_ba_network(1000, 1, 0.5, 0.1, 30)\n",
    "trends = model.build_trends(iterations)\n",
    "#susceptible = trends[0]['trends']['node_count'][0]\n",
    "infected = trends[0]['trends']['node_count'][1]"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 13,
   "metadata": {
    "ExecuteTime": {
     "end_time": "2020-12-21T06:16:15.493678Z",
     "start_time": "2020-12-21T06:16:15.345441Z"
    }
   },
   "outputs": [
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAboAAAEgCAYAAADCCragAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAADh0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uMy4xLjMsIGh0dHA6Ly9tYXRwbG90bGliLm9yZy+AADFEAAAgAElEQVR4nO3de1hUdf4H8PeoOAxIDCroEBel8IZEmCYhKqSlpiiuigpqpUmpld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FgjRURkWfgehMhMDBo0CBMnTlT/jo+Ph1gsRnJyMlauXIlHHnkEbm5ueO2116BUKvHvf/8bEyZMgLOzM3x8fPDJJ59onTM3NxfPP/883N3dIZFIEBwcjN9++609q0VkcEx0RGbuvffeQ11dHTZu3IixY8fiq6++wqJFixAaGopnn30WH3/8MZycnPDee+/hxx9/VB+Xk5ODMWPG4OzZs1izZg02bdqE4uJiBAcH48aNG0asEZF+8dUlkZkbMmQIPvroIwDA5MmTcfbsWezbtw+bNm3C/PnzAQDDhg2Dj48PDh48qF67a9WqVaitrcXhw4fh6uoKABg1ahR8fX3x8ccfY926dcapEJGesUVHZObGjx+v/vdOnTrB29sbADB16lT1dnd3d9jZ2aGgoAAAoFQqkZqaimeffRYODg64c+cO7ty5A3t7e/Tt25evL8misEVHZObEYrHGb5FIBABaC2+KRCJUV1cDAEpKSlBTU4PvvvsO3333ndY57+1HZAmY6Ig6oIceeggCgQATJ07EkiVLtMqtra2NEBWRYTDREXVA3bp1g6+vL/773/9iyJAhEAqFGuUqFYfXkuXgNzqiDioqKgq5ubkYN24cdu3ahYMHD2Lbtm2YMGECzpw5Y+zwiPSGLTqiDiowMBD/+te/sH79erzzzjvo3LkzXF1dMXnyZAwYMMDY4RHpDacAIyIii8ZXl0REZNGY6IiIyKIx0RERkUVjoiMiIovGREdERBaNiY6IiCwaEx0REVk0JjoiIrJoTHRERGTRmOiIiMii/T9sMJwKqoCJ3AAAAABJRU5ErkJggg==\n",
      "text/plain": [
       "<Figure size 432x288 with 1 Axes>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "import matplotlib.pyplot as plt\n",
    "import matplotlib\n",
    "\n",
    "matplotlib.style.use('fivethirtyeight')\n",
    "t = range(len(infected))\n",
    "\n",
    "#plt.plot(t, susceptible, label = 'Susceptible')\n",
    "plt.plot(t, infected, label = 'Infected')\n",
    "plt.legend()\n",
    "plt.xlabel(\"Time\")\n",
    "plt.ylabel(\"Number of People\")\n",
    "plt.show()\n"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 11,
   "metadata": {
    "ExecuteTime": {
     "end_time": "2020-12-19T04:37:35.025408Z",
     "start_time": "2020-12-19T04:37:35.020573Z"
    }
   },
   "outputs": [],
   "source": [
    "def plot_diffusion(model, iterations):\n",
    "    output_notebook() # show bokeh in notebook\n",
    "    trends = model.build_trends(iterations)\n",
    "    viz = DiffusionTrend(model, trends)\n",
    "    p = viz.plot(width=400, height=400)\n",
    "\n",
    "    viz2 = DiffusionPrevalence(model, trends)\n",
    "    p2 = viz2.plot(width=400, height=400)\n",
    "\n",
    "    vm = MultiPlot()\n",
    "    vm.add_plot(p)\n",
    "    vm.add_plot(p2)\n",
    "    m = vm.plot()\n",
    "    show(m)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 12,
   "metadata": {
    "ExecuteTime": {
     "end_time": "2020-12-19T04:37:36.047979Z",
     "start_time": "2020-12-19T04:37:35.885261Z"
    }
   },
   "outputs": [
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "100%|██████████| 30/30 [00:00<00:00, 495.69it/s]\n"
     ]
    },
    {
     "data": {
      "text/html": [
       "\n",
       "    <div class=\"bk-root\">\n",
       "        <a href=\"https://bokeh.org\" target=\"_blank\" class=\"bk-logo bk-logo-small bk-logo-notebook\"></a>\n",
       "        <span id=\"1294\">Loading BokehJS ...</span>\n",
       "    </div>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "data": {
      "application/javascript": [
       "\n",
       "(function(root) {\n",
       "  function now() {\n",
       "    return new Date();\n",
       "  }\n",
       "\n",
       "  var force = true;\n",
       "\n",
       "  if (typeof root._bokeh_onload_callbacks === \"undefined\" || force === true) {\n",
       "    root._bokeh_onload_callbacks = [];\n",
       "    root._bokeh_is_loading = undefined;\n",
       "  }\n",
       "\n",
       "  var JS_MIME_TYPE = 'application/javascript';\n",
       "  var HTML_MIME_TYPE = 'text/html';\n",
       "  var EXEC_MIME_TYPE = 'application/vnd.bokehjs_exec.v0+json';\n",
       "  var CLASS_NAME = 'output_bokeh rendered_html';\n",
       "\n",
       "  /**\n",
       "   * Render data to the DOM node\n",
       "   */\n",
       "  function render(props, node) {\n",
       "    var script = document.createElement(\"script\");\n",
       "    node.appendChild(script);\n",
       "  }\n",
       "\n",
       "  /**\n",
       "   * Handle when an output is cleared or removed\n",
       "   */\n",
       "  function handleClearOutput(event, handle) {\n",
       "    var cell = handle.cell;\n",
       "\n",
       "    var id = cell.output_area._bokeh_element_id;\n",
       "    var server_id = cell.output_area._bokeh_server_id;\n",
       "    // Clean up Bokeh references\n",
       "    if (id != null && id in Bokeh.index) {\n",
       "      Bokeh.index[id].model.document.clear();\n",
       "      delete Bokeh.index[id];\n",
       "    }\n",
       "\n",
       "    if (server_id !== undefined) {\n",
       "      // Clean up Bokeh references\n",
       "      var cmd = \"from bokeh.io.state import curstate; print(curstate().uuid_to_server['\" + server_id + \"'].get_sessions()[0].document.roots[0]._id)\";\n",
       "      cell.notebook.kernel.execute(cmd, {\n",
       "        iopub: {\n",
       "          output: function(msg) {\n",
       "            var id = msg.content.text.trim();\n",
       "            if (id in Bokeh.index) {\n",
       "              Bokeh.index[id].model.document.clear();\n",
       "              delete Bokeh.index[id];\n",
       "            }\n",
       "          }\n",
       "        }\n",
       "      });\n",
       "      // Destroy server and session\n",
       "      var cmd = \"import bokeh.io.notebook as ion; ion.destroy_server('\" + server_id + \"')\";\n",
       "      cell.notebook.kernel.execute(cmd);\n",
       "    }\n",
       "  }\n",
       "\n",
       "  /**\n",
       "   * Handle when a new output is added\n",
       "   */\n",
       "  function handleAddOutput(event, handle) {\n",
       "    var output_area = handle.output_area;\n",
       "    var output = handle.output;\n",
       "\n",
       "    // limit handleAddOutput to display_data with EXEC_MIME_TYPE content only\n",
       "    if ((output.output_type != \"display_data\") || (!output.data.hasOwnProperty(EXEC_MIME_TYPE))) {\n",
       "      return\n",
       "    }\n",
       "\n",
       "    var toinsert = output_area.element.find(\".\" + CLASS_NAME.split(' ')[0]);\n",
       "\n",
       "    if (output.metadata[EXEC_MIME_TYPE][\"id\"] !== undefined) {\n",
       "      toinsert[toinsert.length - 1].firstChild.textContent = output.data[JS_MIME_TYPE];\n",
       "      // store reference to embed id on output_area\n",
       "      output_area._bokeh_element_id = output.metadata[EXEC_MIME_TYPE][\"id\"];\n",
       "    }\n",
       "    if (output.metadata[EXEC_MIME_TYPE][\"server_id\"] !== undefined) {\n",
       "      var bk_div = document.createElement(\"div\");\n",
       "      bk_div.innerHTML = output.data[HTML_MIME_TYPE];\n",
       "      var script_attrs = bk_div.children[0].attributes;\n",
       "      for (var i = 0; i < script_attrs.length; i++) {\n",
       "        toinsert[toinsert.length - 1].firstChild.setAttribute(script_attrs[i].name, script_attrs[i].value);\n",
       "        toinsert[toinsert.length - 1].firstChild.textContent = bk_div.children[0].textContent\n",
       "      }\n",
       "      // store reference to server id on output_area\n",
       "      output_area._bokeh_server_id = output.metadata[EXEC_MIME_TYPE][\"server_id\"];\n",
       "    }\n",
       "  }\n",
       "\n",
       "  function register_renderer(events, OutputArea) {\n",
       "\n",
       "    function append_mime(data, metadata, element) {\n",
       "      // create a DOM node to render to\n",
       "      var toinsert = this.create_output_subarea(\n",
       "        metadata,\n",
       "        CLASS_NAME,\n",
       "        EXEC_MIME_TYPE\n",
       "      );\n",
       "      this.keyboard_manager.register_events(toinsert);\n",
       "      // Render to node\n",
       "      var props = {data: data, metadata: metadata[EXEC_MIME_TYPE]};\n",
       "      render(props, toinsert[toinsert.length - 1]);\n",
       "      element.append(toinsert);\n",
       "      return toinsert\n",
       "    }\n",
       "\n",
       "    /* Handle when an output is cleared or removed */\n",
       "    events.on('clear_output.CodeCell', handleClearOutput);\n",
       "    events.on('delete.Cell', handleClearOutput);\n",
       "\n",
       "    /* Handle when a new output is added */\n",
       "    events.on('output_added.OutputArea', handleAddOutput);\n",
       "\n",
       "    /**\n",
       "     * Register the mime type and append_mime function with output_area\n",
       "     */\n",
       "    OutputArea.prototype.register_mime_type(EXEC_MIME_TYPE, append_mime, {\n",
       "      /* Is output safe? */\n",
       "      safe: true,\n",
       "      /* Index of renderer in `output_area.display_order` */\n",
       "      index: 0\n",
       "    });\n",
       "  }\n",
       "\n",
       "  // register the mime type if in Jupyter Notebook environment and previously unregistered\n",
       "  if (root.Jupyter !== undefined) {\n",
       "    var events = require('base/js/events');\n",
       "    var OutputArea = require('notebook/js/outputarea').OutputArea;\n",
       "\n",
       "    if (OutputArea.prototype.mime_types().indexOf(EXEC_MIME_TYPE) == -1) {\n",
       "      register_renderer(events, OutputArea);\n",
       "    }\n",
       "  }\n",
       "\n",
       "  \n",
       "  if (typeof (root._bokeh_timeout) === \"undefined\" || force === true) {\n",
       "    root._bokeh_timeout = Date.now() + 5000;\n",
       "    root._bokeh_failed_load = false;\n",
       "  }\n",
       "\n",
       "  var NB_LOAD_WARNING = {'data': {'text/html':\n",
       "     \"<div style='background-color: #fdd'>\\n\"+\n",
       "     \"<p>\\n\"+\n",
       "     \"BokehJS does not appear to have successfully loaded. If loading BokehJS from CDN, this \\n\"+\n",
       "     \"may be due to a slow or bad network connection. Possible fixes:\\n\"+\n",
       "     \"</p>\\n\"+\n",
       "     \"<ul>\\n\"+\n",
       "     \"<li>re-rerun `output_notebook()` to attempt to load from CDN again, or</li>\\n\"+\n",
       "     \"<li>use INLINE resources instead, as so:</li>\\n\"+\n",
       "     \"</ul>\\n\"+\n",
       "     \"<code>\\n\"+\n",
       "     \"from bokeh.resources import INLINE\\n\"+\n",
       "     \"output_notebook(resources=INLINE)\\n\"+\n",
       "     \"</code>\\n\"+\n",
       "     \"</div>\"}};\n",
       "\n",
       "  function display_loaded() {\n",
       "    var el = document.getElementById(\"1294\");\n",
       "    if (el != null) {\n",
       "      el.textContent = \"BokehJS is loading...\";\n",
       "    }\n",
       "    if (root.Bokeh !== undefined) {\n",
       "      if (el != null) {\n",
       "        el.textContent = \"BokehJS \" + root.Bokeh.version + \" successfully loaded.\";\n",
       "      }\n",
       "    } else if (Date.now() < root._bokeh_timeout) {\n",
       "      setTimeout(display_loaded, 100)\n",
       "    }\n",
       "  }\n",
       "\n",
       "\n",
       "  function run_callbacks() {\n",
       "    try {\n",
       "      root._bokeh_onload_callbacks.forEach(function(callback) {\n",
       "        if (callback != null)\n",
       "          callback();\n",
       "      });\n",
       "    } finally {\n",
       "      delete root._bokeh_onload_callbacks\n",
       "    }\n",
       "    console.debug(\"Bokeh: all callbacks have finished\");\n",
       "  }\n",
       "\n",
       "  function load_libs(css_urls, js_urls, callback) {\n",
       "    if (css_urls == null) css_urls = [];\n",
       "    if (js_urls == null) js_urls = [];\n",
       "\n",
       "    root._bokeh_onload_callbacks.push(callback);\n",
       "    if (root._bokeh_is_loading > 0) {\n",
       "      console.debug(\"Bokeh: BokehJS is being loaded, scheduling callback at\", now());\n",
       "      return null;\n",
       "    }\n",
       "    if (js_urls == null || js_urls.length === 0) {\n",
       "      run_callbacks();\n",
       "      return null;\n",
       "    }\n",
       "    console.debug(\"Bokeh: BokehJS not loaded, scheduling load and callback at\", now());\n",
       "    root._bokeh_is_loading = css_urls.length + js_urls.length;\n",
       "\n",
       "    function on_load() {\n",
       "      root._bokeh_is_loading--;\n",
       "      if (root._bokeh_is_loading === 0) {\n",
       "        console.debug(\"Bokeh: all BokehJS libraries/stylesheets loaded\");\n",
       "        run_callbacks()\n",
       "      }\n",
       "    }\n",
       "\n",
       "    function on_error() {\n",
       "      console.error(\"failed to load \" + url);\n",
       "    }\n",
       "\n",
       "    for (var i = 0; i < css_urls.length; i++) {\n",
       "      var url = css_urls[i];\n",
       "      const element = document.createElement(\"link\");\n",
       "      element.onload = on_load;\n",
       "      element.onerror = on_error;\n",
       "      element.rel = \"stylesheet\";\n",
       "      element.type = \"text/css\";\n",
       "      element.href = url;\n",
       "      console.debug(\"Bokeh: injecting link tag for BokehJS stylesheet: \", url);\n",
       "      document.body.appendChild(element);\n",
       "    }\n",
       "\n",
       "    const hashes = {\"https://cdn.bokeh.org/bokeh/release/bokeh-2.2.3.min.js\": \"T2yuo9Oe71Cz/I4X9Ac5+gpEa5a8PpJCDlqKYO0CfAuEszu1JrXLl8YugMqYe3sM\", \"https://cdn.bokeh.org/bokeh/release/bokeh-widgets-2.2.3.min.js\": \"98GDGJ0kOMCUMUePhksaQ/GYgB3+NH9h996V88sh3aOiUNX3N+fLXAtry6xctSZ6\", \"https://cdn.bokeh.org/bokeh/release/bokeh-tables-2.2.3.min.js\": \"89bArO+nlbP3sgakeHjCo1JYxYR5wufVgA3IbUvDY+K7w4zyxJqssu7wVnfeKCq8\"};\n",
       "\n",
       "    for (var i = 0; i < js_urls.length; i++) {\n",
       "      var url = js_urls[i];\n",
       "      var element = document.createElement('script');\n",
       "      element.onload = on_load;\n",
       "      element.onerror = on_error;\n",
       "      element.async = false;\n",
       "      element.src = url;\n",
       "      if (url in hashes) {\n",
       "        element.crossOrigin = \"anonymous\";\n",
       "        element.integrity = \"sha384-\" + hashes[url];\n",
       "      }\n",
       "      console.debug(\"Bokeh: injecting script tag for BokehJS library: \", url);\n",
       "      document.head.appendChild(element);\n",
       "    }\n",
       "  };\n",
       "\n",
       "  function inject_raw_css(css) {\n",
       "    const element = document.createElement(\"style\");\n",
       "    element.appendChild(document.createTextNode(css));\n",
       "    document.body.appendChild(element);\n",
       "  }\n",
       "\n",
       "  \n",
       "  var js_urls = [\"https://cdn.bokeh.org/bokeh/release/bokeh-2.2.3.min.js\", \"https://cdn.bokeh.org/bokeh/release/bokeh-widgets-2.2.3.min.js\", \"https://cdn.bokeh.org/bokeh/release/bokeh-tables-2.2.3.min.js\"];\n",
       "  var css_urls = [];\n",
       "  \n",
       "\n",
       "  var inline_js = [\n",
       "    function(Bokeh) {\n",
       "      Bokeh.set_log_level(\"info\");\n",
       "    },\n",
       "    function(Bokeh) {\n",
       "    \n",
       "    \n",
       "    }\n",
       "  ];\n",
       "\n",
       "  function run_inline_js() {\n",
       "    \n",
       "    if (root.Bokeh !== undefined || force === true) {\n",
       "      \n",
       "    for (var i = 0; i < inline_js.length; i++) {\n",
       "      inline_js[i].call(root, root.Bokeh);\n",
       "    }\n",
       "    if (force === true) {\n",
       "        display_loaded();\n",
       "      }} else if (Date.now() < root._bokeh_timeout) {\n",
       "      setTimeout(run_inline_js, 100);\n",
       "    } else if (!root._bokeh_failed_load) {\n",
       "      console.log(\"Bokeh: BokehJS failed to load within specified timeout.\");\n",
       "      root._bokeh_failed_load = true;\n",
       "    } else if (force !== true) {\n",
       "      var cell = $(document.getElementById(\"1294\")).parents('.cell').data().cell;\n",
       "      cell.output_area.append_execute_result(NB_LOAD_WARNING)\n",
       "    }\n",
       "\n",
       "  }\n",
       "\n",
       "  if (root._bokeh_is_loading === 0) {\n",
       "    console.debug(\"Bokeh: BokehJS loaded, going straight to plotting\");\n",
       "    run_inline_js();\n",
       "  } else {\n",
       "    load_libs(css_urls, js_urls, function() {\n",
       "      console.debug(\"Bokeh: BokehJS plotting callback run at\", now());\n",
       "      run_inline_js();\n",
       "    });\n",
       "  }\n",
       "}(window));"
      ],
      "application/vnd.bokehjs_load.v0+json": "\n(function(root) {\n  function now() {\n    return new Date();\n  }\n\n  var force = true;\n\n  if (typeof root._bokeh_onload_callbacks === \"undefined\" || force === true) {\n    root._bokeh_onload_callbacks = [];\n    root._bokeh_is_loading = undefined;\n  }\n\n  \n\n  \n  if (typeof (root._bokeh_timeout) === \"undefined\" || force === true) {\n    root._bokeh_timeout = Date.now() + 5000;\n    root._bokeh_failed_load = false;\n  }\n\n  var NB_LOAD_WARNING = {'data': {'text/html':\n     \"<div style='background-color: #fdd'>\\n\"+\n     \"<p>\\n\"+\n     \"BokehJS does not appear to have successfully loaded. If loading BokehJS from CDN, this \\n\"+\n     \"may be due to a slow or bad network connection. Possible fixes:\\n\"+\n     \"</p>\\n\"+\n     \"<ul>\\n\"+\n     \"<li>re-rerun `output_notebook()` to attempt to load from CDN again, or</li>\\n\"+\n     \"<li>use INLINE resources instead, as so:</li>\\n\"+\n     \"</ul>\\n\"+\n     \"<code>\\n\"+\n     \"from bokeh.resources import INLINE\\n\"+\n     \"output_notebook(resources=INLINE)\\n\"+\n     \"</code>\\n\"+\n     \"</div>\"}};\n\n  function display_loaded() {\n    var el = document.getElementById(\"1294\");\n    if (el != null) {\n      el.textContent = \"BokehJS is loading...\";\n    }\n    if (root.Bokeh !== undefined) {\n      if (el != null) {\n        el.textContent = \"BokehJS \" + root.Bokeh.version + \" successfully loaded.\";\n      }\n    } else if (Date.now() < root._bokeh_timeout) {\n      setTimeout(display_loaded, 100)\n    }\n  }\n\n\n  function run_callbacks() {\n    try {\n      root._bokeh_onload_callbacks.forEach(function(callback) {\n        if (callback != null)\n          callback();\n      });\n    } finally {\n      delete root._bokeh_onload_callbacks\n    }\n    console.debug(\"Bokeh: all callbacks have finished\");\n  }\n\n  function load_libs(css_urls, js_urls, callback) {\n    if (css_urls == null) css_urls = [];\n    if (js_urls == null) js_urls = [];\n\n    root._bokeh_onload_callbacks.push(callback);\n    if (root._bokeh_is_loading > 0) {\n      console.debug(\"Bokeh: BokehJS is being loaded, scheduling callback at\", now());\n      return null;\n    }\n    if (js_urls == null || js_urls.length === 0) {\n      run_callbacks();\n      return null;\n    }\n    console.debug(\"Bokeh: BokehJS not loaded, scheduling load and callback at\", now());\n    root._bokeh_is_loading = css_urls.length + js_urls.length;\n\n    function on_load() {\n      root._bokeh_is_loading--;\n      if (root._bokeh_is_loading === 0) {\n        console.debug(\"Bokeh: all BokehJS libraries/stylesheets loaded\");\n        run_callbacks()\n      }\n    }\n\n    function on_error() {\n      console.error(\"failed to load \" + url);\n    }\n\n    for (var i = 0; i < css_urls.length; i++) {\n      var url = css_urls[i];\n      const element = document.createElement(\"link\");\n      element.onload = on_load;\n      element.onerror = on_error;\n      element.rel = \"stylesheet\";\n      element.type = \"text/css\";\n      element.href = url;\n      console.debug(\"Bokeh: injecting link tag for BokehJS stylesheet: \", url);\n      document.body.appendChild(element);\n    }\n\n    const hashes = {\"https://cdn.bokeh.org/bokeh/release/bokeh-2.2.3.min.js\": \"T2yuo9Oe71Cz/I4X9Ac5+gpEa5a8PpJCDlqKYO0CfAuEszu1JrXLl8YugMqYe3sM\", \"https://cdn.bokeh.org/bokeh/release/bokeh-widgets-2.2.3.min.js\": \"98GDGJ0kOMCUMUePhksaQ/GYgB3+NH9h996V88sh3aOiUNX3N+fLXAtry6xctSZ6\", \"https://cdn.bokeh.org/bokeh/release/bokeh-tables-2.2.3.min.js\": \"89bArO+nlbP3sgakeHjCo1JYxYR5wufVgA3IbUvDY+K7w4zyxJqssu7wVnfeKCq8\"};\n\n    for (var i = 0; i < js_urls.length; i++) {\n      var url = js_urls[i];\n      var element = document.createElement('script');\n      element.onload = on_load;\n      element.onerror = on_error;\n      element.async = false;\n      element.src = url;\n      if (url in hashes) {\n        element.crossOrigin = \"anonymous\";\n        element.integrity = \"sha384-\" + hashes[url];\n      }\n      console.debug(\"Bokeh: injecting script tag for BokehJS library: \", url);\n      document.head.appendChild(element);\n    }\n  };\n\n  function inject_raw_css(css) {\n    const element = document.createElement(\"style\");\n    element.appendChild(document.createTextNode(css));\n    document.body.appendChild(element);\n  }\n\n  \n  var js_urls = [\"https://cdn.bokeh.org/bokeh/release/bokeh-2.2.3.min.js\", \"https://cdn.bokeh.org/bokeh/release/bokeh-widgets-2.2.3.min.js\", \"https://cdn.bokeh.org/bokeh/release/bokeh-tables-2.2.3.min.js\"];\n  var css_urls = [];\n  \n\n  var inline_js = [\n    function(Bokeh) {\n      Bokeh.set_log_level(\"info\");\n    },\n    function(Bokeh) {\n    \n    \n    }\n  ];\n\n  function run_inline_js() {\n    \n    if (root.Bokeh !== undefined || force === true) {\n      \n    for (var i = 0; i < inline_js.length; i++) {\n      inline_js[i].call(root, root.Bokeh);\n    }\n    if (force === true) {\n        display_loaded();\n      }} else if (Date.now() < root._bokeh_timeout) {\n      setTimeout(run_inline_js, 100);\n    } else if (!root._bokeh_failed_load) {\n      console.log(\"Bokeh: BokehJS failed to load within specified timeout.\");\n      root._bokeh_failed_load = true;\n    } else if (force !== true) {\n      var cell = $(document.getElementById(\"1294\")).parents('.cell').data().cell;\n      cell.output_area.append_execute_result(NB_LOAD_WARNING)\n    }\n\n  }\n\n  if (root._bokeh_is_loading === 0) {\n    console.debug(\"Bokeh: BokehJS loaded, going straight to plotting\");\n    run_inline_js();\n  } else {\n    load_libs(css_urls, js_urls, function() {\n      console.debug(\"Bokeh: BokehJS plotting callback run at\", now());\n      run_inline_js();\n    });\n  }\n}(window));"
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "BokehDeprecationWarning: 'legend' keyword is deprecated, use explicit 'legend_label', 'legend_field', or 'legend_group' keywords instead\n",
      "BokehDeprecationWarning: 'legend' keyword is deprecated, use explicit 'legend_label', 'legend_field', or 'legend_group' keywords instead\n",
      "BokehDeprecationWarning: 'legend' keyword is deprecated, use explicit 'legend_label', 'legend_field', or 'legend_group' keywords instead\n",
      "BokehDeprecationWarning: 'legend' keyword is deprecated, use explicit 'legend_label', 'legend_field', or 'legend_group' keywords instead\n"
     ]
    },
    {
     "data": {
      "text/html": [
       "\n",
       "\n",
       "\n",
       "\n",
       "\n",
       "\n",
       "  <div class=\"bk-root\" id=\"14d66ad6-4024-46df-adc8-5b4211676eab\" data-root-id=\"1454\"></div>\n"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "data": {
      "application/javascript": [
       "(function(root) {\n",
       "  function embed_document(root) {\n",
       "    \n",
       "  var docs_json = {\"b843c9c6-670e-4249-8965-7573b62aebf6\":{\"roots\":{\"references\":[{\"attributes\":{\"children\":[{\"id\":\"1453\"},{\"id\":\"1451\"}]},\"id\":\"1454\",\"type\":\"Column\"},{\"attributes\":{\"label\":{\"value\":\"Susceptible\"},\"renderers\":[{\"id\":\"1395\"}]},\"id\":\"1407\",\"type\":\"LegendItem\"},{\"attributes\":{},\"id\":\"1296\",\"type\":\"DataRange1d\"},{\"attributes\":{},\"id\":\"1405\",\"type\":\"Selection\"},{\"attributes\":{\"label\":{\"value\":\"Infected\"},\"renderers\":[{\"id\":\"1411\"}]},\"id\":\"1424\",\"type\":\"LegendItem\"},{\"attributes\":{\"line_alpha\":0.5,\"line_color\":\"#aec7e8\",\"line_width\":2,\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"1409\",\"type\":\"Line\"},{\"attributes\":{\"data\":{\"x\":[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29],\"y\":{\"__ndarray__\":\"AAAAAAAAAAAAAAAAACBgQAAAAAAAAERAAAAAAAAAKEAAAAAAAADwPwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA\",\"dtype\":\"float64\",\"order\":\"little\",\"shape\":[30]}},\"selected\":{\"id\":\"1423\"},\"selection_policy\":{\"id\":\"1422\"}},\"id\":\"1408\",\"type\":\"ColumnDataSource\"},{\"attributes\":{\"source\":{\"id\":\"1408\"}},\"id\":\"1412\",\"type\":\"CDSView\"},{\"attributes\":{},\"id\":\"1300\",\"type\":\"LinearScale\"},{\"attributes\":{},\"id\":\"1375\",\"type\":\"BasicTicker\"},{\"attributes\":{\"axis\":{\"id\":\"1374\"},\"dimension\":1,\"grid_line_alpha\":0.5,\"ticker\":null},\"id\":\"1377\",\"type\":\"Grid\"},{\"attributes\":{\"data_source\":{\"id\":\"1408\"},\"glyph\":{\"id\":\"1409\"},\"hover_glyph\":null,\"muted_glyph\":null,\"nonselection_glyph\":{\"id\":\"1410\"},\"selection_glyph\":null,\"view\":{\"id\":\"1412\"}},\"id\":\"1411\",\"type\":\"GlyphRenderer\"},{\"attributes\":{\"data\":{\"x\":[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29],\"y\":{\"__ndarray__\":\"zczMzMzM7D956SYxCKzoPzEIrBxaZOc/NV66SQwC5z9g5dAi2/nmP2Dl0CLb+eY/YOXQItv55j9g5dAi2/nmP2Dl0CLb+eY/YOXQItv55j9g5dAi2/nmP2Dl0CLb+eY/YOXQItv55j9g5dAi2/nmP2Dl0CLb+eY/YOXQItv55j9g5dAi2/nmP2Dl0CLb+eY/YOXQItv55j9g5dAi2/nmP2Dl0CLb+eY/YOXQItv55j9g5dAi2/nmP2Dl0CLb+eY/YOXQItv55j9g5dAi2/nmP2Dl0CLb+eY/YOXQItv55j9g5dAi2/nmP2Dl0CLb+eY/\",\"dtype\":\"float64\",\"order\":\"little\",\"shape\":[30]}},\"selected\":{\"id\":\"1339\"},\"selection_policy\":{\"id\":\"1338\"}},\"id\":\"1326\",\"type\":\"ColumnDataSource\"},{\"attributes\":{},\"id\":\"1366\",\"type\":\"LinearScale\"},{\"attributes\":{\"data_source\":{\"id\":\"1392\"},\"glyph\":{\"id\":\"1393\"},\"hover_glyph\":null,\"muted_glyph\":null,\"nonselection_glyph\":{\"id\":\"1394\"},\"selection_glyph\":null,\"view\":{\"id\":\"1396\"}},\"id\":\"1395\",\"type\":\"GlyphRenderer\"},{\"attributes\":{},\"id\":\"1422\",\"type\":\"UnionRenderers\"},{\"attributes\":{\"line_alpha\":0.1,\"line_color\":\"#aec7e8\",\"line_width\":2,\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"1410\",\"type\":\"Line\"},{\"attributes\":{\"axis_label\":\"#Delta Nodes\",\"formatter\":{\"id\":\"1399\"},\"ticker\":{\"id\":\"1375\"}},\"id\":\"1374\",\"type\":\"LinearAxis\"},{\"attributes\":{},\"id\":\"1423\",\"type\":\"Selection\"},{\"attributes\":{},\"id\":\"1404\",\"type\":\"UnionRenderers\"},{\"attributes\":{\"data\":{\"x\":[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29],\"y\":{\"__ndarray__\":\"AAAAAAAAAAAAAAAAACBgwAAAAAAAAETAAAAAAAAAKMAAAAAAAADwvwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA\",\"dtype\":\"float64\",\"order\":\"little\",\"shape\":[30]}},\"selected\":{\"id\":\"1405\"},\"selection_policy\":{\"id\":\"1404\"}},\"id\":\"1392\",\"type\":\"ColumnDataSource\"},{\"attributes\":{\"line_alpha\":0.1,\"line_color\":\"#1f77b4\",\"line_width\":2,\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"1394\",\"type\":\"Line\"},{\"attributes\":{\"toolbar\":{\"id\":\"1452\"},\"toolbar_location\":\"above\"},\"id\":\"1453\",\"type\":\"ToolbarBox\"},{\"attributes\":{\"active_drag\":\"auto\",\"active_inspect\":\"auto\",\"active_multi\":null,\"active_scroll\":\"auto\",\"active_tap\":\"auto\",\"tools\":[{\"id\":\"1378\"},{\"id\":\"1379\"},{\"id\":\"1380\"},{\"id\":\"1381\"},{\"id\":\"1382\"},{\"id\":\"1383\"}]},\"id\":\"1385\",\"type\":\"Toolbar\"},{\"attributes\":{},\"id\":\"1378\",\"type\":\"PanTool\"},{\"attributes\":{\"align\":\"center\",\"text\":\"fraction infected: 0.1\"},\"id\":\"1426\",\"type\":\"Title\"},{\"attributes\":{},\"id\":\"1356\",\"type\":\"UnionRenderers\"},{\"attributes\":{},\"id\":\"1379\",\"type\":\"WheelZoomTool\"},{\"attributes\":{},\"id\":\"1357\",\"type\":\"Selection\"},{\"attributes\":{\"label\":{\"value\":\"Infected\"},\"renderers\":[{\"id\":\"1345\"}]},\"id\":\"1358\",\"type\":\"LegendItem\"},{\"attributes\":{\"toolbars\":[{\"id\":\"1319\"},{\"id\":\"1385\"}],\"tools\":[{\"id\":\"1312\"},{\"id\":\"1313\"},{\"id\":\"1314\"},{\"id\":\"1315\"},{\"id\":\"1316\"},{\"id\":\"1317\"},{\"id\":\"1378\"},{\"id\":\"1379\"},{\"id\":\"1380\"},{\"id\":\"1381\"},{\"id\":\"1382\"},{\"id\":\"1383\"}]},\"id\":\"1452\",\"type\":\"ProxyToolbar\"},{\"attributes\":{\"overlay\":{\"id\":\"1384\"}},\"id\":\"1380\",\"type\":\"BoxZoomTool\"},{\"attributes\":{\"line_alpha\":0.1,\"line_color\":\"#aec7e8\",\"line_width\":2,\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"1344\",\"type\":\"Line\"},{\"attributes\":{},\"id\":\"1298\",\"type\":\"DataRange1d\"},{\"attributes\":{\"data_source\":{\"id\":\"1342\"},\"glyph\":{\"id\":\"1343\"},\"hover_glyph\":null,\"muted_glyph\":null,\"nonselection_glyph\":{\"id\":\"1344\"},\"selection_glyph\":null,\"view\":{\"id\":\"1346\"}},\"id\":\"1345\",\"type\":\"GlyphRenderer\"},{\"attributes\":{},\"id\":\"1382\",\"type\":\"ResetTool\"},{\"attributes\":{},\"id\":\"1381\",\"type\":\"SaveTool\"},{\"attributes\":{},\"id\":\"1302\",\"type\":\"LinearScale\"},{\"attributes\":{},\"id\":\"1383\",\"type\":\"HelpTool\"},{\"attributes\":{\"align\":\"center\",\"text\":\"fraction infected: 0.1\"},\"id\":\"1360\",\"type\":\"Title\"},{\"attributes\":{\"data\":{\"x\":[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29],\"y\":{\"__ndarray__\":\"mpmZmZmZuT8dWmQ730/NP57vp8ZLN9E/lkOLbOf70T8/NV66SQzSPz81XrpJDNI/PzVeukkM0j8/NV66SQzSPz81XrpJDNI/PzVeukkM0j8/NV66SQzSPz81XrpJDNI/PzVeukkM0j8/NV66SQzSPz81XrpJDNI/PzVeukkM0j8/NV66SQzSPz81XrpJDNI/PzVeukkM0j8/NV66SQzSPz81XrpJDNI/PzVeukkM0j8/NV66SQzSPz81XrpJDNI/PzVeukkM0j8/NV66SQzSPz81XrpJDNI/PzVeukkM0j8/NV66SQzSPz81XrpJDNI/\",\"dtype\":\"float64\",\"order\":\"little\",\"shape\":[30]}},\"selected\":{\"id\":\"1357\"},\"selection_policy\":{\"id\":\"1356\"}},\"id\":\"1342\",\"type\":\"ColumnDataSource\"},{\"attributes\":{\"source\":{\"id\":\"1342\"}},\"id\":\"1346\",\"type\":\"CDSView\"},{\"attributes\":{\"children\":[[{\"id\":\"1295\"},0,0],[{\"id\":\"1361\"},0,1]]},\"id\":\"1451\",\"type\":\"GridBox\"},{\"attributes\":{},\"id\":\"1335\",\"type\":\"BasicTickFormatter\"},{\"attributes\":{\"text\":\"Threshold - Prevalence\"},\"id\":\"1398\",\"type\":\"Title\"},{\"attributes\":{},\"id\":\"1338\",\"type\":\"UnionRenderers\"},{\"attributes\":{},\"id\":\"1305\",\"type\":\"BasicTicker\"},{\"attributes\":{},\"id\":\"1362\",\"type\":\"DataRange1d\"},{\"attributes\":{\"line_alpha\":0.5,\"line_color\":\"#aec7e8\",\"line_width\":2,\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"1343\",\"type\":\"Line\"},{\"attributes\":{\"bottom_units\":\"screen\",\"fill_alpha\":0.5,\"fill_color\":\"lightgrey\",\"left_units\":\"screen\",\"level\":\"overlay\",\"line_alpha\":1.0,\"line_color\":\"black\",\"line_dash\":[4,4],\"line_width\":2,\"right_units\":\"screen\",\"top_units\":\"screen\"},\"id\":\"1384\",\"type\":\"BoxAnnotation\"},{\"attributes\":{},\"id\":\"1339\",\"type\":\"Selection\"},{\"attributes\":{\"axis_label\":\"Iterations\",\"formatter\":{\"id\":\"1335\"},\"ticker\":{\"id\":\"1305\"}},\"id\":\"1304\",\"type\":\"LinearAxis\"},{\"attributes\":{\"items\":[{\"id\":\"1407\"},{\"id\":\"1424\"}],\"orientation\":\"horizontal\"},\"id\":\"1406\",\"type\":\"Legend\"},{\"attributes\":{\"axis\":{\"id\":\"1304\"},\"grid_line_alpha\":0.5,\"ticker\":null},\"id\":\"1307\",\"type\":\"Grid\"},{\"attributes\":{},\"id\":\"1399\",\"type\":\"BasicTickFormatter\"},{\"attributes\":{},\"id\":\"1401\",\"type\":\"BasicTickFormatter\"},{\"attributes\":{\"line_alpha\":0.1,\"line_color\":\"#1f77b4\",\"line_width\":2,\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"1328\",\"type\":\"Line\"},{\"attributes\":{},\"id\":\"1364\",\"type\":\"DataRange1d\"},{\"attributes\":{},\"id\":\"1368\",\"type\":\"LinearScale\"},{\"attributes\":{\"bottom_units\":\"screen\",\"fill_alpha\":0.5,\"fill_color\":\"lightgrey\",\"left_units\":\"screen\",\"level\":\"overlay\",\"line_alpha\":1.0,\"line_color\":\"black\",\"line_dash\":[4,4],\"line_width\":2,\"right_units\":\"screen\",\"top_units\":\"screen\"},\"id\":\"1318\",\"type\":\"BoxAnnotation\"},{\"attributes\":{\"axis_label\":\"#Nodes\",\"formatter\":{\"id\":\"1333\"},\"ticker\":{\"id\":\"1309\"}},\"id\":\"1308\",\"type\":\"LinearAxis\"},{\"attributes\":{\"below\":[{\"id\":\"1370\"},{\"id\":\"1426\"}],\"center\":[{\"id\":\"1373\"},{\"id\":\"1377\"},{\"id\":\"1406\"}],\"left\":[{\"id\":\"1374\"}],\"plot_height\":400,\"plot_width\":400,\"renderers\":[{\"id\":\"1395\"},{\"id\":\"1411\"}],\"title\":{\"id\":\"1398\"},\"toolbar\":{\"id\":\"1385\"},\"toolbar_location\":null,\"x_range\":{\"id\":\"1362\"},\"x_scale\":{\"id\":\"1366\"},\"y_range\":{\"id\":\"1364\"},\"y_scale\":{\"id\":\"1368\"}},\"id\":\"1361\",\"subtype\":\"Figure\",\"type\":\"Plot\"},{\"attributes\":{\"line_alpha\":0.5,\"line_color\":\"#1f77b4\",\"line_width\":2,\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"1327\",\"type\":\"Line\"},{\"attributes\":{\"line_alpha\":0.5,\"line_color\":\"#1f77b4\",\"line_width\":2,\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"1393\",\"type\":\"Line\"},{\"attributes\":{},\"id\":\"1333\",\"type\":\"BasicTickFormatter\"},{\"attributes\":{\"text\":\"Threshold - Diffusion Trend\"},\"id\":\"1332\",\"type\":\"Title\"},{\"attributes\":{},\"id\":\"1315\",\"type\":\"SaveTool\"},{\"attributes\":{\"overlay\":{\"id\":\"1318\"}},\"id\":\"1314\",\"type\":\"BoxZoomTool\"},{\"attributes\":{},\"id\":\"1316\",\"type\":\"ResetTool\"},{\"attributes\":{},\"id\":\"1317\",\"type\":\"HelpTool\"},{\"attributes\":{\"label\":{\"value\":\"Susceptible\"},\"renderers\":[{\"id\":\"1329\"}]},\"id\":\"1341\",\"type\":\"LegendItem\"},{\"attributes\":{\"source\":{\"id\":\"1392\"}},\"id\":\"1396\",\"type\":\"CDSView\"},{\"attributes\":{\"below\":[{\"id\":\"1304\"},{\"id\":\"1360\"}],\"center\":[{\"id\":\"1307\"},{\"id\":\"1311\"},{\"id\":\"1340\"}],\"left\":[{\"id\":\"1308\"}],\"plot_height\":400,\"plot_width\":400,\"renderers\":[{\"id\":\"1329\"},{\"id\":\"1345\"}],\"title\":{\"id\":\"1332\"},\"toolbar\":{\"id\":\"1319\"},\"toolbar_location\":null,\"x_range\":{\"id\":\"1296\"},\"x_scale\":{\"id\":\"1300\"},\"y_range\":{\"id\":\"1298\"},\"y_scale\":{\"id\":\"1302\"}},\"id\":\"1295\",\"subtype\":\"Figure\",\"type\":\"Plot\"},{\"attributes\":{\"axis\":{\"id\":\"1308\"},\"dimension\":1,\"grid_line_alpha\":0.5,\"ticker\":null},\"id\":\"1311\",\"type\":\"Grid\"},{\"attributes\":{\"axis\":{\"id\":\"1370\"},\"grid_line_alpha\":0.5,\"ticker\":null},\"id\":\"1373\",\"type\":\"Grid\"},{\"attributes\":{\"data_source\":{\"id\":\"1326\"},\"glyph\":{\"id\":\"1327\"},\"hover_glyph\":null,\"muted_glyph\":null,\"nonselection_glyph\":{\"id\":\"1328\"},\"selection_glyph\":null,\"view\":{\"id\":\"1330\"}},\"id\":\"1329\",\"type\":\"GlyphRenderer\"},{\"attributes\":{},\"id\":\"1309\",\"type\":\"BasicTicker\"},{\"attributes\":{\"active_drag\":\"auto\",\"active_inspect\":\"auto\",\"active_multi\":null,\"active_scroll\":\"auto\",\"active_tap\":\"auto\",\"tools\":[{\"id\":\"1312\"},{\"id\":\"1313\"},{\"id\":\"1314\"},{\"id\":\"1315\"},{\"id\":\"1316\"},{\"id\":\"1317\"}]},\"id\":\"1319\",\"type\":\"Toolbar\"},{\"attributes\":{\"items\":[{\"id\":\"1341\"},{\"id\":\"1358\"}],\"orientation\":\"horizontal\"},\"id\":\"1340\",\"type\":\"Legend\"},{\"attributes\":{\"axis_label\":\"Iterations\",\"formatter\":{\"id\":\"1401\"},\"ticker\":{\"id\":\"1371\"}},\"id\":\"1370\",\"type\":\"LinearAxis\"},{\"attributes\":{},\"id\":\"1371\",\"type\":\"BasicTicker\"},{\"attributes\":{},\"id\":\"1313\",\"type\":\"WheelZoomTool\"},{\"attributes\":{},\"id\":\"1312\",\"type\":\"PanTool\"},{\"attributes\":{\"source\":{\"id\":\"1326\"}},\"id\":\"1330\",\"type\":\"CDSView\"}],\"root_ids\":[\"1454\"]},\"title\":\"Bokeh Application\",\"version\":\"2.2.3\"}};\n",
       "  var render_items = [{\"docid\":\"b843c9c6-670e-4249-8965-7573b62aebf6\",\"root_ids\":[\"1454\"],\"roots\":{\"1454\":\"14d66ad6-4024-46df-adc8-5b4211676eab\"}}];\n",
       "  root.Bokeh.embed.embed_items_notebook(docs_json, render_items);\n",
       "\n",
       "  }\n",
       "  if (root.Bokeh !== undefined) {\n",
       "    embed_document(root);\n",
       "  } else {\n",
       "    var attempts = 0;\n",
       "    var timer = setInterval(function(root) {\n",
       "      if (root.Bokeh !== undefined) {\n",
       "        clearInterval(timer);\n",
       "        embed_document(root);\n",
       "      } else {\n",
       "        attempts++;\n",
       "        if (attempts > 100) {\n",
       "          clearInterval(timer);\n",
       "          console.log(\"Bokeh: ERROR: Unable to run BokehJS code because BokehJS library is missing\");\n",
       "        }\n",
       "      }\n",
       "    }, 10, root)\n",
       "  }\n",
       "})(window);"
      ],
      "application/vnd.bokehjs_exec.v0+json": ""
     },
     "metadata": {
      "application/vnd.bokehjs_exec.v0+json": {
       "id": "1454"
      }
     },
     "output_type": "display_data"
    }
   ],
   "source": [
    "model, iterations = watts_model_ba_network(1, 0.5, 0.1, 30)\n",
    "plot_diffusion(model, iterations)"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## Simulation with thresholdmodel"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 1,
   "metadata": {
    "ExecuteTime": {
     "end_time": "2020-12-21T06:02:06.681611Z",
     "start_time": "2020-12-21T06:02:02.884008Z"
    }
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Requirement already up-to-date: thresholdmodel in /opt/anaconda3/lib/python3.7/site-packages (0.0.3)\n",
      "Requirement already satisfied, skipping upgrade: numpy>=1.14 in /opt/anaconda3/lib/python3.7/site-packages (from thresholdmodel) (1.18.1)\n",
      "Requirement already satisfied, skipping upgrade: networkx>=2.0 in /opt/anaconda3/lib/python3.7/site-packages (from thresholdmodel) (2.4)\n",
      "Requirement already satisfied, skipping upgrade: decorator>=4.3.0 in /opt/anaconda3/lib/python3.7/site-packages (from networkx>=2.0->thresholdmodel) (4.4.1)\n",
      "Note: you may need to restart the kernel to use updated packages.\n"
     ]
    }
   ],
   "source": [
    "pip install -U thresholdmodel\n"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "https://github.com/benmaier/thresholdmodel"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 2,
   "metadata": {
    "ExecuteTime": {
     "end_time": "2020-12-21T06:02:21.058972Z",
     "start_time": "2020-12-21T06:02:19.523523Z"
    }
   },
   "outputs": [
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAXIAAAD6CAYAAAC8sMwIAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAADh0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uMy4xLjMsIGh0dHA6Ly9tYXRwbG90bGliLm9yZy+AADFEAAAdvklEQVR4nO3deXxU9b3/8ddnsgcSwpKwZAFkB9mjotWfWrjgXrVetVa72Nbe/vqztlfbW+ttb9vb7bb6+HVR+yu11qWLXttq1V9dqqJVRAVkUVkkkISEhCwkkH2b+d4/MmhAQgbI5MyZeT8fDx6ZM9/DmbdD8vbkO2cx5xwiIuJfAa8DiIjIiVGRi4j4nIpcRMTnVOQiIj6nIhcR8bnkoX7BMWPGuEmTJg31y4qI+Nr69evrnXO5Rxob8iKfNGkS69atG+qXFRHxNTMr729MUysiIj6nIhcR8TkVuYiIz6nIRUR8TkUuIuJzERe5mWWY2fRohhERkWM3YJGbWbaZPQbUAF87wvjJZrbJzMrN7Bdmpr18EZEhFMlx5CHgF8CTwJIjjN8NfB14FngBuAR4bLACiohEyjlHZ0+Izu4QPaEQQecIhQh/dQRD7v3Hrnf54Hgw5Ai995w77DkOHQ9/PWS8z2u8Nx5+rie8zenjsrho3oRB/+8esMidcy3A82b2qcPHzC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6YmQHjnHPVZnYe8L1YPxnEzL4NnApUxfr3A/QWuXNuktc5ImFmDwDvAt8H0oBO54NiM7MRwAZgunOu50S25Zc98hXAS865Pc65vcALwFKPM/XLOdfinHseOKF/nKHinNvnnPuz61UPVAA5XufqTzhndXhxIrDJyzwDMbNZwCnAf3udJd6Y2TjgDOAH4e+LDj+UeNjHgT+daImDf4q8kEOvz1IJjPcoS1wzs5OBdOBtr7McjZl9zcz2AV8Bvut1nv6Ef3v4OXCT11mOUXt4muK1GJ+6mgOUAn8OT7PdHn7P/eAzwL2DsSG/FHkqEOqzHKJ3ikUGkZmNAR4EPh3rezXOuR8750YD3wCeieEf3n8BXnTOlXgd5Fg452Y556YAXwV+b2ax+htaHjAbuBFYBHwIuNjTRBEws8VAh3Nu22Bszy9FXg3k91kuoPfXfxkkZjYSeAL4hnNurdd5IuWc+wswnN65/Vh0HXC1mW2k9zeHy8zsqx5niphz7mWgDJjkbZJ+1QLrnXOVzrlW4O/ADI8zReJzwG8Ga2N+KfJngBVmltdnTuxZjzPFDTPLBh4Hvu+ce8rrPAMxs5PC3weY2en07tnE5CVMnXNnOOfmOucWAN8CHnXO/cTrXEdjZsPMbHz48UJ6pzF3eJuqX68Bs81sgpmlAcuAdR5nOiozG0bvbw2D9plJ8mBtKJqcczVmdhuwJvzUzeH/+8ak8FE2G4AsIN3MzgE+55xb5Wmw/n2J3l9Lf2pmPw0/t9w5t8vDTEeTAzxtZkn07pFd5XGeeJMJvBR+fw8A18bqz5tzrtXMbqR3TzwNuC+Gf84Ougp42jnXMlgb9MXhhyIi0j+/TK2IiEg/VOQiIj6nIhcR8TkVuYiIz6nIRUR8TkUuIuJzKnIREZ9TkYuI+Nz/ADzP4H3uOzObAAAAAElFTkSuQmCC\n",
      "text/plain": [
       "<Figure size 432x288 with 1 Axes>"
      ]
     },
     "metadata": {
      "needs_background": "light"
     },
     "output_type": "display_data"
    }
   ],
   "source": [
    "import numpy as np\n",
    "import networkx as nx\n",
    "import matplotlib.pyplot as plt\n",
    "\n",
    "from thresholdmodel import ThreshModel\n",
    "\n",
    "N = 1000\n",
    "k = 10\n",
    "\n",
    "thresholds = 0.1\n",
    "initially_activated = np.arange(100)\n",
    "\n",
    "G = nx.fast_gnp_random_graph(N, k/(N-1.0))\n",
    "\n",
    "Thresh = ThreshModel(G,initially_activated,thresholds)\n",
    "t, cascade_size = Thresh.simulate()\n",
    "\n",
    "plt.plot(t,cascade_size)\n",
    "plt.show()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 3,
   "metadata": {
    "ExecuteTime": {
     "end_time": "2020-12-21T06:02:23.503573Z",
     "start_time": "2020-12-21T06:02:23.499751Z"
    }
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "<networkx.classes.graph.Graph at 0xa19d9e610>"
      ]
     },
     "execution_count": 3,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "G"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 20,
   "metadata": {
    "ExecuteTime": {
     "end_time": "2020-12-21T06:19:26.202569Z",
     "start_time": "2020-12-21T06:19:26.198450Z"
    }
   },
   "outputs": [],
   "source": [
    "nx.fast_gnp_random_graph?"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 18,
   "metadata": {
    "ExecuteTime": {
     "end_time": "2020-12-21T06:18:40.115701Z",
     "start_time": "2020-12-21T06:18:40.084743Z"
    }
   },
   "outputs": [],
   "source": [
    "from thresholdmodel import ThreshModel\n",
    "\n",
    "N = 1000\n",
    "k = 10\n",
    "initially_activated = np.arange(100)\n",
    "G = nx.fast_gnp_random_graph(N, k/(N-1.0))\n",
    "\n",
    "thresholds = list(np.random.rand(G.number_of_nodes()))\n",
    "\n",
    "\n",
    "Thresh = ThreshModel(G, initially_activated, thresholds)\n",
    "t, cascade_size = Thresh.simulate()"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "https://github.com/benmaier/thresholdmodel/issues/1"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 19,
   "metadata": {
    "ExecuteTime": {
     "end_time": "2020-12-21T06:18:41.523608Z",
     "start_time": "2020-12-21T06:18:41.412714Z"
    }
   },
   "outputs": [
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAZ0AAAELCAYAAAAC4Fv8AAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAADh0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uMy4xLjMsIGh0dHA6Ly9tYXRwbG90bGliLm9yZy+AADFEAAAgAElEQVR4nO3deXxU5b0/8M9smZnsywQSEhIWoyQQluBSEDRaUqsxWK621mC590bLvbYuNS3ovYi56UtN2iuY+MNQbKV1uxVc6NVrXGqDEoKFCC4kUZkSNicQsk2WSWY95/dHJHCYkJmQ2efzfr3yIvOcczLfOUzmk7M8zyMzGo0iiIiIfEDu7wKIiCh8MHSIiMhnGDpEROQzDB0iIvIZhg4REfkMQ4eIiHyGoUNERD7D0CEiIp8J+tDR6/X+LiHscJ/7B/e773Gfe17Qhw4REQUPhg4REfkMQ4eIiHyGoUNERD7D0CEiIp9h6BARhTmzXcQhow3vnzBjyO7d2W6UXv3pREQ0YYIootMs4OSgA6cGBbQPOWCyibAKIqwOERYBsDlEWAQRNgGwOM4sw9l1HN8u+/axVQCsDhFDDhGnh4SR56q/ZRJyE1Veey0MHSKiAGQTRLzWOoRnmgfwZY8NDh9Nt3m0387QISIKB1aHiEO9duw0mPG7FhMMgw6f13Cs3+7Vn8/QISKaIFEUMWAXYbaLMDvOfGHkseXb01iWM8vs56zjEPHNgB1NPXZ8bbTBJrh+Pk+Ty4C0KAUyoxWYpFV49bkYOkQUcgRRRJdZGLmOYROGr2HYBHHke/s51zzswvC/tm+viVgdImwicPK0EnGmvnO2HQ6JbrOATrMDXRYB3WYBXRbB62ERHyFDaqQCKZEKTNbKERchR4RCBrVcBpUC3/4rg1oORChkiJDLEHHO92oFoJLLoFbIoJIDasWZ72WYpJVDJZd59wV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Xzfe1dubi527twJlUqFw4cP4ze/+Q1uvvlm7NmzB7Gxsf4uLygFXeio1WoAgMVikVzItlgsTr+Q5DkZGRkj38+fPx9xcXFYvXo1Tp06hZSUFD9WFh7OvO+tVqukne9774qPj8eCBQsAAHPmzMHll1+OOXPm4P3338dtt93m5+qCU9CdXktNTQUwPGHcuQwGA6ZNm+aHisJTbm4uAODEiRN+riQ8JCUlQa1W833vZ2lpaUhMTOT7fgKCLnTmzZsHrVaLurq6kbbm5ma0t7cjPz/ff4WFmf3790MmkzldYyDvkMvluOKKKyTve5vNht27d/N970NHjx5FV1cXpk+f7u9SglbQnV7TarUoKSlBZWUlMjIyoNPpsHbtWhQWFiI7O9vf5YWsdevW4eqrr0ZGRgb279+PsrIy3HnnnZg0aZK/SwspbW1tMJvN6OzsBDA8HTwAJCcn4+c//zlWrlyJLVu2YMmSJdi8eTNUKhXuuOMOf5Yc9Mba56+88go0Gg3mz58Pg8GA8vJyzJo1CzfddJM/Sw5qQTmfjtVqxbp167B9+3aIooiioiJUVFTwwp4XPfzww3jttdcwMDCAzMxMrFy5Ej/72c/YSc7DCgsLR+1v9swzz2DlypXYunUrNm7ciM7OTlxxxRXYuHEjp1OeoLH2uUKhwOOPP47Tp09j0qRJWLZsGR599FEkJCT4odLQEJShQ0REwSnorukQEVHwYugQEZHPMHSIiMhnGDpEROQzDB0iIvIZhg4REfkMQ4eIiHyGoUNERD7D0CEiIp9h6BARkc/8f3fGL8/0ZPm/AAAAAElFTkSuQmCC\n",
      "text/plain": [
       "<Figure size 432x288 with 1 Axes>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "plt.plot(t,cascade_size)\n",
    "plt.show()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": []
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.7.6"
  },
  "toc": {
   "base_numbering": 1,
   "nav_menu": {},
   "number_sections": false,
   "sideBar": true,
   "skip_h1_title": false,
   "title_cell": "Table of Contents",
   "title_sidebar": "Contents",
   "toc_cell": false,
   "toc_position": {
    "height": "calc(100% - 180px)",
    "left": "10px",
    "top": "150px",
    "width": "300.391px"
   },
   "toc_section_display": true,
   "toc_window_display": true
  }
 },
 "nbformat": 4,
 "nbformat_minor": 4
}
